package com.mszlu.news.controller;

import com.mszlu.news.service.ComplainService;
import com.mszlu.news.vo.Result;
import com.mszlu.news.vo.params.ComplainParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "举报接口")
@RestController
@RequestMapping("complain")
public class ComplainController {

    @Autowired
    private ComplainService complainService;

    @ApiOperation(value = "增加举报")
    @PostMapping("add")
    public Result addComplain(@RequestBody ComplainParam complainParam){
        return complainService.addComplain(complainParam);
    }
}
